<%--
  Created by IntelliJ IDEA.
  User: 周欣
  Date: 2021/5/29
  Time: 21:37
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>EL获取四个特定的域中的属性</title>
</head>
<body>
    <%--
        pageScope Map<String,Object>         它可以获取 pageContext 域中的数据
        requestScope Map<String,Object>      它可以获取 Request 域中的数据
        sessionScope Map<String,Object>      它可以获取 Session 域中的数据
        applicationScope Map<String,Object>  它可以获取 ServletContext 域中的数据
    --%>
    <%
        pageContext.setAttribute("key1", "pageContext1");
        pageContext.setAttribute("key2", "pageContext2");
        request.setAttribute("key2", "request");
        session.setAttribute("key2", "session");
        application.setAttribute("key2", "application");
    %>
    ${ applicationScope.key2 }
    ${ pageScope.key2 }
    ${ sessionScope.key2 }
    ${ requestScope.key2 }

</body>
</html>
